"""
列表中的排序方法的用法

    列表.sort() 升序排序
    列表.sort(reverse=True) 降序排序
    列表.reverse() 列表逆序，反转
"""

name_list = ["zhangsan", "lisi", "wangwu", "laoliu"]
number_list = [10, 7, 32, 16, 50]

print("字符串列表排序")
print("=" * 50)
print(name_list)
name_list.sort()
print(name_list)
name_list.sort(reverse=True)
print(name_list)
name_list.reverse()
print(name_list)

print("")
print("整数列表排序")
print("=" * 50)
print(number_list)
number_list.sort()
print(number_list)
number_list.sort(reverse=True)
print(number_list)
number_list.reverse()
print(number_list)

